<?php
//商品列表项属性搜索项的控制
function setAttrActive($index,$avid,$av_value){
	$tmp =$s = explode('-',$_GET['s']);
	$s[$index-1]=$avid;
	$s=implode('-',$s);
	$url = U("category",array('cid'=>$_GET['cid'],'s'=>$s));
	$active=$tmp[$index-1]==$avid?' class ="active" ':'';
	return '<li '.$active.'><a href="'.$url.'" >'.$av_value.'</a></li>';
}
